from flask import current_app, send_from_directory, Blueprint, render_template
from flask_login import login_required

bp = Blueprint('site', __name__)


@bp.route('/')
@login_required
def index():
    return render_template('admin/site/index.html')

@bp.route('/uploads/<path:filename>')
def get_image(filename):
    return send_from_directory(current_app.config['BLUELOG_UPLOAD_PATH'], filename)